<?php if(!defined('IN_PISCES')){exit('Access Denied.');}if(!empty($this->data['adList']) && !empty($this->data['adList'][12])) { if(isset($this->data['adList'][12]) && is_array($this->data['adList'][12])) foreach($this->data['adList'][12] as $mk=>$item) { ?>
<div class="ad-all mb5">
<?php echo $item['code'];?>
</div>
<?php } } ?>
<div id="yui-main">
<div class="yui-b ppl">
<div class="tab">
<ul>
<li class="selected"><a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Post','List');?>"><span>所有帖子</span></a></li>
<li><a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Post','Edit');?>"><span>发表帖子</span></a></li>
<li><a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Post','Product');?>"><span>分享商品</span></a></li>
</ul>
</div>
<div class="postsbox">
<table cellspacing="0" cellpadding="0" class="tbl-posts">
<tbody>
<tr>
<td colspan="4" class="tag">
<a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Post','List');?>">全部分类</a>
<?php $pTagService = new TagService();$pvTagList = $pTagService->getList(array(),'id ASC',0,20,'id,name');if(!empty($pvTagList['rows'])) { if(isset($pvTagList['rows']) && is_array($pvTagList['rows'])) foreach($pvTagList['rows'] as $item) { if($this->data['tag_id']==$item['id']) { ?><span class="select"><?php echo $item['name'];?></span><?php } else { ?><a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Post','List',array('tag'=>$item['id']));?>"><?php echo $item['name'];?></a><?php } } } ?>
</td>
</tr>
<tr>
<th class="subject">标题</th>
<th class="later">发表</th>
<th class="score">阅读</th>
<th class="last">最后回复</th>
</tr>
<?php if(!empty($this->data['postList'])) { if(isset($this->data['postList']) && is_array($this->data['postList'])) foreach($this->data['postList'] as $mk=>$item) { ?>
<tr<?php if((($mk % 2) == 1)) { ?> class="odd"<?php } ?>>
<td class="subject">
<div class="detail">
<?php if($item['visit_num']>20) { ?><span class="status"><img alt="热门帖" src="<?php echo $this->data['baseurl'];?>images/post_hot.png"></span><?php } ?>
<a target="_blank" href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Post','View',array('id'=>$item['id']));?>"><?php echo $item['title'];?></a>
</div>
</td>
<td class="later">
<div class="info comet-xs">
<h4><?php echo $item['username'];?></h4>
<div class="time"><?php echo $this->data['cf']->getBeforeTime($item['created']);?></div>
</div>
</td>
<td class="score">
<?php echo $item['visit_num'];?>
</td>
<td class="last">
<div class="info comet-xs">
<div class="name"><?php echo $item['last_post'];?></div>
</div>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
<div class="pager mt10"><?php echo $this->data['pages'];?></div>
</div>
</div>
</div>
<div class="yui-b">
<?php if(!empty($this->data['adList']) && !empty($this->data['adList'][17])) { if(isset($this->data['adList'][17]) && is_array($this->data['adList'][17])) foreach($this->data['adList'][17] as $mk=>$item) { ?>
<div class="index-right-ad mb5 ml10">
<?php echo $item['code'];?>
</div>
<?php } } $dispatcher = LtObjectUtil::singleton('LtDispatcher');
$dispatcher->dispatchComponent('frontend', 'right', $this->context);
$comdata = $dispatcher->data;
unset($dispatcher);
if(!defined('IN_PISCES')){exit('Access Denied.');}?>
<script language="javascript" src="<?php echo $this->data['baseurl'];?>js/jquery/jquery.js"></script>
<script language="javascript" src="<?php echo $this->data['baseurl'];?>js/jquery/liscroll.js"></script>
<script language="javascript">
function checkSearch()
{
if($('#searchKey').val()=='')
{
alert('请输入要搜索的关键词！');
return false;
}
return true;
}
</script>
<div id="left" class="col210 ml10 mt10">
<div class="indexinfo">
<?php if($this->data['user']) { ?>
<div class="userbox">
<div class="userlogo">
<img src="<?php echo $this->data['user']['logo'];?>" width="60" height="60" />
</div>
<div class="userinfo">
<ul>
<li>欢迎您，<a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('User','Index');?>"><?php echo $this->data['user']['username'];?></a></li>
<?php if($this->data['return']['rate']>0) { ?><li>账户余额：<a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Return','Index');?>"><?php echo $this->data['user']['money'];?></a></li>
<li><a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Return','Edit');?>">申请提现</a> <a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Return','Index');?>">我的返现</a></li>
<?php } else { ?>
<li><a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Post','Edit');?>">发表帖子</a> <a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Post','Product');?>">分享商品</a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="loginbox"><button class="login_btn" onclick="document.location='<?php echo LtObjectUtil::singleton('LtUrl')->generate('User','Logout');?>'">退出登录</button></div>
<?php } else { ?>
<div class="loginbox"><button class="login_btn" onclick="document.location='<?php echo $this->data['loginUrl'];?>'">会员登录</button></div>
<?php } ?>
</div>
<div class="line"></div>
<div class="indexinfo find">
<h2>找找看</h2>
<ul>
<form method="post" action="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Default','List');?>">
<input type="text" name="k" class="searchKey" id="searchKey" autocomplete="off" /><input type="submit" class="login_btn" value="用输入的关键词找找看" onclick="return checkSearch();"/>
</form>
</ul>
</div>
<?php $pHsService = new HelpService();$pvHelpList = $pHsService->getList(array(),'id DESC',0,10,'id,title');if(!empty($pvHelpList['rows'])) { ?>
<div class="line"></div>
<div class="indexinfo news">
<h2>网站公告</h2>
<ul>
<?php if(isset($pvHelpList['rows']) && is_array($pvHelpList['rows'])) foreach($pvHelpList['rows'] as $k=>$item) { ?>
<li><a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Help','Index',array('id'=>$item['id']));?>" title="<?php echo $item['title'];?>"><?php echo $item['title'];?></a></li>
<?php } ?>
</ul>
</div>
<?php } $pvRecentViewList = LtObjectUtil::singleton('ViewHistoryUtil')->getRecentViewHistory(20,array('num_iid','title'));if(!empty($pvRecentViewList)) { ?>
<div class="line"></div>
<div class="indexinfo news">
<h2>最新成交</h2>
<div class="ranklist2">
<ul>
<?php if(isset($pvRecentViewList) && is_array($pvRecentViewList)) foreach($pvRecentViewList as $k=>$item) { ?>
<li><a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Default','View',array('id'=>$this->data['cf']->getId($item['num_iid'])));?>" title="<?php echo strip_tags($item['title']);?>" target="_blank"><?php echo strip_tags($item['title']);?></a></li>
<?php } ?>
</ul>
</div>
</div>
<?php if(count($pvRecentViewList)>10) { ?>
<script language="javascript">
$(".ranklist2").jCarouselLite({
auto: 1000,
speed: 500,
vertical: true,
visible: 10
});
</script>
<?php } } $pvPostList = LtObjectUtil::singleton('PostService')->getList(array('type'=>1,'status'=>1),'last_updated DESC',0,10,'id,title',0,'site_right');if(!empty($pvPostList['rows'])) { ?>
<div class="line"></div>
<div class="indexinfo news">
<h2>购物讨论</h2>
<ul>
<?php if(isset($pvPostList['rows']) && is_array($pvPostList['rows'])) foreach($pvPostList['rows'] as $k=>$item) { ?>
<li><a href="<?php echo LtObjectUtil::singleton('LtUrl')->generate('Post','View',array('id'=>$item['id']));?>" title="<?php echo $item['title'];?>" target="_blank"><?php echo $item['title'];?></a></li>
<?php } ?>
</ul>
</div>
<?php } ?>
</div>
<?php if(!empty($this->data['adList']) && !empty($this->data['adList'][18])) { if(isset($this->data['adList'][18]) && is_array($this->data['adList'][18])) foreach($this->data['adList'][18] as $mk=>$item) { ?>
<div class="index-right-ad mt5 ml10">
<?php echo $item['code'];?>
</div>
<?php } } ?>
</div>
<?php if(!empty($this->data['adList']) && !empty($this->data['adList'][13])) { ?>
<div class="clear"></div>
<?php if(isset($this->data['adList'][13]) && is_array($this->data['adList'][13])) foreach($this->data['adList'][13] as $mk=>$item) { ?>
<div class="ad-all mt5">
<?php echo $item['code'];?>
</div>
<?php } } ?>
<script language="javascript">
replaceImage();
</script>